﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MailServer.Message {
    [Serializable]
    public class Data {

        private Content content;
        private Information information;

        public Data(long identifier, string subject, string body, int status) {
            this.content = new Content(subject, body);
            this.information = new Information(identifier, status);
        }

        public bool CheckIdentifier(long identifier) {
            return information.CheckIdentifier(identifier);
        }

        public bool CheckStatus(int status) {
            return information.CheckStatus(status);
        }

        public override string ToString() {
            return content.ToString() + Environment.NewLine +
                   information.ToString();
        }

    }
}
